﻿// Project: Salient
// http://salient.codeplex.com
// 
// Copyright 2010, Sky Sanders <sky at skysanders.net>
// Dual licensed under the MIT or GPL Version 2 licenses.
// http://salient.codeplex.com/license
// 
// Date: April 24 2010 

#region

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Net;
using System.Web.ApplicationServices;
using System.Web.Script.Serialization;

#endregion


namespace Salient.Web.Hosting.ApplicationServices
{
    ///<summary>
    ///</summary>
    public static class ProfileServiceHelperEx
    {



        ///<summary>
        ///</summary>
        ///<param name="server"></param>
        ///<param name="cookies"></param>
        ///<param name="authenticatedUserOnly"></param>
        ///<returns></returns>
        public static Dictionary<string, object> ProfileGetAllPropertiesForCurrentUserAppSvc(this IWebServer server,
                                                                                       CookieContainer cookies,
                                                                                       bool authenticatedUserOnly)
        {
            return Salient.Web.ApplicationServices.ProfileServiceHelper.ProfileGetAllPropertiesForCurrentUserAppSvc(server.RootUrl, cookies, authenticatedUserOnly);
        }

     

        ///<summary>
        ///</summary>
        ///<param name="server"></param>
        ///<param name="cookies"></param>
        ///<param name="properties"></param>
        ///<param name="authenticatedUserOnly"></param>
        ///<returns></returns>
        public static Dictionary<string, object> ProfileGetPropertiesForCurrentUserAppSvc(this IWebServer server,
                                                                                    CookieContainer cookies,
                                                                                    IEnumerable<string> properties,
                                                                                    bool authenticatedUserOnly)
        {
            return Salient.Web.ApplicationServices.ProfileServiceHelper.ProfileGetPropertiesForCurrentUserAppSvc(server.RootUrl, cookies, properties, authenticatedUserOnly);
        }

   

        ///<summary>
        ///</summary>
        ///<param name="server"></param>
        ///<param name="cookies"></param>
        ///<returns></returns>
        public static Collection<ProfilePropertyMetadata> ProfileGetPropertiesMetadataAppSvc(this IWebServer server,
                                                                                       CookieContainer cookies)
        {
            return Salient.Web.ApplicationServices.ProfileServiceHelper.ProfileGetPropertiesMetadataAppSvc(server.RootUrl, cookies);
        }



        ///<summary>
        ///</summary>
        ///<param name="server"></param>
        ///<param name="cookies"></param>
        ///<param name="values"></param>
        ///<param name="authenticatedUserOnly"></param>
        ///<returns></returns>
        public static Collection<string> ProfileSetPropertiesForCurrentUserAppSvc(this IWebServer server,
                                                                            CookieContainer cookies,
                                                                            IDictionary<string, object> values,
                                                                            bool authenticatedUserOnly)
        {
            return Salient.Web.ApplicationServices.ProfileServiceHelper.ProfileSetPropertiesForCurrentUserAppSvc(server.RootUrl, cookies, values, authenticatedUserOnly);
        }


    }
}